package com.qiangesoft.im.pojo.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * <p>
 * 消息
 * </p>
 *
 * @author qiangesoft
 * @date 2024-02-07
 */
@Data
@ApiModel(value = "消息")
public class ImMessageDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "聊天类型：01-私聊 02-群聊")
    @NotBlank(message = "聊天类型不能为空")
    private String chatType;

    @ApiModelProperty(value = "聊天会话id")
    private Long chatId;

    @ApiModelProperty(value = "聊天对象id：私聊时为用户id，群聊时为群组id")
    private Long targetId;

    @ApiModelProperty(value = "消息类型：01-系统、02-文本、03-图片、04-音频、05-视频")
    @NotBlank(message = "消息类型不能为空")
    private String messageType;

    @ApiModelProperty(value = "消息")
    @NotBlank(message = "消息不能为空")
    private String message;

    @ApiModelProperty(value = "扩展字段")
    private String extra;

    @ApiModelProperty(value = "时间戳")
    private Long timestamp;
}
